##############################################################################
# cmake configuration file for streamlog
#
# returns following variables:
#
#   streamlog_FOUND      : set to TRUE if streamlog found
#   streamlog_VERSION    : package version
#   streamlog_ROOT       : path to this streamlog installation
#   streamlog_LIBRARIES  : list of streamlog libraries
#   streamlog_INCLUDE_DIRS  : list of paths to be used with INCLUDE_DIRECTORIES
#   streamlog_LIBRARY_DIRS  : list of paths to be used with LINK_DIRECTORIES
#
# @author Jan Engels, Desy
##############################################################################

SET( streamlog_ROOT "@CMAKE_INSTALL_PREFIX@" )
SET( streamlog_VERSION "@streamlog_VERSION@" )


# ---------- include dirs -----------------------------------------------------
# do not store find results in cache
SET( streamlog_INCLUDE_DIRS streamlog_INCLUDE_DIRS-NOTFOUND )
MARK_AS_ADVANCED( streamlog_INCLUDE_DIRS )

FIND_PATH( streamlog_INCLUDE_DIRS
	NAMES streamlog/streamlog.h
	PATHS ${streamlog_ROOT}/include
	NO_DEFAULT_PATH
)



# ---------- libraries --------------------------------------------------------
# do not store find results in cache
SET( streamlog_LIBRARY_DIRS ${streamlog_ROOT}/lib )
SET( streamlog_LIBRARIES streamlog_LIBRARIES-NOTFOUND )
MARK_AS_ADVANCED( streamlog_LIBRARY_DIRS streamlog_LIBRARIES )

FIND_LIBRARY( streamlog_LIBRARIES
	NAMES streamlog
	PATHS ${streamlog_LIBRARY_DIRS}
	NO_DEFAULT_PATH
)



# ---------- final checking ---------------------------------------------------
INCLUDE( FindPackageHandleStandardArgs )
# set STREAMLOG_FOUND to TRUE if all listed variables are TRUE and not empty
FIND_PACKAGE_HANDLE_STANDARD_ARGS( streamlog DEFAULT_MSG streamlog_ROOT streamlog_INCLUDE_DIRS streamlog_LIBRARIES )

SET( streamlog_FOUND ${STREAMLOG_FOUND} )

